<?php
session_start();
$email=$_SESSION['email'];
if(isset($_SESSION['languages']))
{
unset($_SESSION['languages']);
}
if(isset($_SESSION['lang']))
{
unset($_SESSION['lang']);
}
include ("headerforsuggestion.php");
//include('databaseconnection.php');


 
if(isset ($_GET['msg'])){
                echo $_GET['msg'];
            }

$result=mysql_query("SELECT * FROM suggestions");
if(!$result) echo "invalid";
if (mysql_num_rows($result) >= 1) 
  {
  echo "<table border='1'  cellspacing='1' cellpadding='2'  align='left' width='100%'>
<tr>
<th>Term</th>
<th>Domain</th>
<th>Language</th>
<th>Suggested Meaning</th>
<th>Status</th>
<th>Suggested Date</th>
<th>Votes</th>
<th>More</th>

</tr>";
while($row=mysql_fetch_array($result))
{

echo "<tr>";
$term=$row['term'];
echo "<td width='15%'>".$row['term']."<input type='hidden' name='butt' value='$term'</td>";

echo "<td width='15%'>".$row['domain']."</td>";

echo "<td width='15%'>".$row['language']."</td>";
$sugg=$row['suggestion'];
echo "<td width='20%'>".$row['suggestion']."<input type='hidden' name='butt1' value='$sugg'</td>";
echo "<td width='12%'>".$row['status']."</td>";
echo "<td width='10%'>".$row['suggested_date']."</td>";

$votes=$row['votes'];
echo "<td width='7%'><a href='votesofsugg.php?err=$term.$sugg'>".$votes."</a></td>";

echo "<td width='3%'><a href='updateSuggestionComment.php?lis=$term.$sugg.$votes'>More</a></td>";


echo "</tr>";
}
echo "</table>";
}
else
{
 echo   "<table width='960px' height='82' border='1' class='table' align='left'>";
   echo "<tr><td>No New Suggestions</td></tr>";
   echo "</table>";
}
include ("footer.php");
?>
